package com.cnhis.cloudhealth.clidoctorweb.clisendadvicehistory;

import javax.ws.rs.FormParam;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;

import org.jboss.resteasy.logging.Logger;
import org.springframework.stereotype.Component;

import com.alibaba.dubbo.config.annotation.Reference;
import com.cnhis.cloudhealth.clinical.clidoctor.clisendadvicehistory.service.ISendAdviceHistory;
import com.cnhis.cloudhealth.commons.Mappers.ModelVo;
import java.util.HashMap;

@Path("sendadvicehistory")
@Component
public class SendAdviceHistoryRest {
	Logger log = Logger.getLogger(SendAdviceHistoryRest.class); 
	@Reference
	private ISendAdviceHistory sendAdviceHistory;
	/* ScriptId(1020) */
	/* Description(草药、手术发送记录) */
	/**
	 * 
	 * @param lVAFID 医嘱id
	 * @param acf01
	 * @return
	 * @throws Exception
	 */
	@SuppressWarnings("unchecked")
	@POST
	@Path("herbandoperationsendhistory")
	@Produces({ MediaType.APPLICATION_JSON })
	public ModelVo  herbAndOperationSendHistory(
			@FormParam("lVAFID") long lVAFID
			)throws Exception{
		HashMap map = new HashMap();
		map.put("lVAFID", lVAFID);
		map.put("acf01", 1);
		return sendAdviceHistory.herbAndOperationSendHistory(map, 1, 10);
	}
	/* ScriptId(7238) */
	/* Description(医嘱历史记录西成药发送记录) */
	@SuppressWarnings("unchecked")
	@POST
	@Path("pharmacysendhistory")
	@Produces({ MediaType.APPLICATION_JSON })
	public ModelVo pharmacySendHistory(
			@FormParam("lVAF01") long lVAF01,
			@FormParam("lVAF01A") long lVAF01A
			)throws Exception{
		HashMap map = new HashMap();
		map.put("lVAF01", lVAF01);
		map.put("lVAF01A", lVAF01A);
		return sendAdviceHistory.pharmacySendHistory(map, 1, 10);
	}
		/* ScriptId(1021) */
		/* Description(其它类型 医嘱发送记录) */
	@SuppressWarnings("unchecked")
	@POST
	@Path("otheradvicesendhistory")
	@Produces({ MediaType.APPLICATION_JSON })
	public ModelVo otherAdviceSendHistory(@FormParam("VAF01") long VAF01)throws Exception{
		HashMap map = new HashMap();
		map.put("VAF01", VAF01);
		map.put("acf01", 1);
		return sendAdviceHistory.otherAdviceSendHistory(map, 1, 10);
	}
	/* ScriptId(1019) */
	/* Description(--西、成药发送记录) */
	/**
	 * 
	 * @param lVAF01 医嘱id
	 * @param lVAF01A
	 * @param acf01
	 * @return
	 * @throws Exception
	 */
	@SuppressWarnings("unchecked")
	@POST
	@Path("sendpharmacyhistory")
	@Produces({ MediaType.APPLICATION_JSON })
	public ModelVo sendPharmacyHistory(
			@FormParam("lVAF01") long lVAF01,
			@FormParam("lVAF01A") long lVAF01A
			)throws Exception{
		HashMap map = new HashMap();
		map.put("lVAF01", lVAF01);
		map.put("acf01", 1);
		map.put("lVAF01A", lVAF01A);
		return sendAdviceHistory.sendPharmacyHistory(map);
	}
	/* ScriptId(7239) */
	/* Description(医嘱历史记录草药、检查、手术对应发送记录) */
	@SuppressWarnings("unchecked")
	@POST
	@Path("sendhistory")
	@Produces({ MediaType.APPLICATION_JSON })
	public ModelVo sendHistory(@QueryParam("lVAFID") long lVAFID)throws Exception{
		HashMap map = new HashMap();
		map.put("lVAFID", lVAFID);
		return sendAdviceHistory.sendHistory(map);
	}
}
